package ${packageName}.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Builder;
<#if hasDateType>
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.LocalDateTime;
</#if>
<#if hasBigDecimal>
import java.math.BigDecimal;
</#if>

/**
 * ${tableComment!''}
 * 
 * @author ${author}
 * @date ${.now?string("yyyy-MM-dd HH:mm:ss")}
 * @table ${tableName}
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("${tableName}")
public class ${className} {

<#list columns as column>
    <#if column.columnComment??>
    /** ${column.columnComment} */
    </#if>
    <#if column.primaryKey>
        <#if hasCompositePrimaryKey!false>
    @TableId(type = IdType.INPUT)
        <#elseif column.autoIncrement>
    @TableId(type = IdType.AUTO)
        <#else>
    @TableId(type = IdType.INPUT)
        </#if>
    <#else>
    @TableField("${column.columnName}")
    </#if>
    private ${column.javaType} ${column.javaFieldName};

</#list>
}